export const PAGE_SIZE = 10;
export const BAIDU_MAP_KEY = 'rEbQDhkj1LktHPyrVvxjTLSe1IIYqGsW';
export const ALL_PAGE_SIZE = 10000;
export const CITY_CODE = '';
// h5与rn交互ready消息间隔
export const WEB_VIEW_READY_INTERVAL        = 100;


export const Actions = {
    // 首页
    HOME: {
        GET_NEWS_REQUEST: 'HOME_GET_NEWS_REQUEST',
        GET_NEWS_SUCCESS: 'HOME_GET_NEWS_SUCCESS',
        GET_NEWS_FAILURE: 'HOME_GET_NEWS_FAILURE',
        SET_SCROLL_OFFSET: 'HOME_SET_SCROLL_OFFSET',
        GET_WEATHER_SUCCESS: 'HOME_GET_WEATHER_SUCCESS',
        NEWS_INCREASE_CLICK_COUNT: 'HOME_NEWS_INCREASE_CLICK_COUNT',
    },
    // 景区
    SCENIC: {
        // 景区列表
        LIST: {
            SET_SELECTED_TAB_INDEX: 'SCENIC_LIST_SELECTED_TAB_INDEX_SET',
            GET_LIST_REQUEST: 'SCENIC_GET_LIST_REQUEST',
            GET_LIST_SUCCESS: 'SCENIC_GET_LIST_SUCCESS',
            GET_LIST_FAILURE: 'SCENIC_GET_LIST_FAILURE',
            // 返回上一级页面时清空列表，
            GO_BACK: 'SCENIC_LIST_GO_BACK',
            // 下拉刷新时，删除旧的列表数据
            DELETE: 'SCENIC_LIST_DELETE',
            SET_KEYWORD: 'SCENIC_SET_KEYWORD',
            SET_LISTVIEW_OFFSET: 'SCENIC_LIST_SET_LISTVIEW_OFFSET'
        },
    },
    // 新闻
    NEWS: {
        // 新闻列表
        LIST: {
            SET_SELECTED_TAB_INDEX: 'NEWS_LIST_SELECTED_TAB_INDEX_SET',
            GET_LIST_REQUEST: 'NEWS_GET_LIST_REQUEST',
            GET_LIST_SUCCESS: 'NEWS_GET_LIST_SUCCESS',
            GET_LIST_FAILURE: 'NEWS_GET_LIST_FAILURE',
            // 返回上一级页面时清空列表，
            GO_BACK: 'NEWS_LIST_GO_BACK',
            // 下拉刷新时，删除旧的列表数据
            DELETE: 'NEWS_LIST_DELETE',
            SET_LISTVIEW_OFFSET: 'NEWS_LIST_SET_LISTVIEW_OFFSET',
            INCREASE_CLICK_COUNT: 'NEWS_LIST_INCREASE_CLICK_COUNT',
        },
        // 新闻详情
        DETAIL: {
            GET_DETAIL_REQUEST: 'NEWS_GET_DETAIL_REQUEST',
            GET_DETAIL_SUCCESS: 'NEWS_GET_DETAIL_SUCCESS',
            GET_DETAIL_FAILURE: 'NEWS_GET_DETAIL_FAILURE',
            GO_BACK: 'NEWS_DETAIL_DELETE',
        },
    },
};

// localstorage key
export const STORAGE_KEY = {
    USER_LOGIN_FORM: 'USER_LOGIN_FORM',
    USER_INFO: 'USER_INFO',
    SEPCIALSHOP_SEARCH_HISTORY:'SEPCIALSHOP_SEARCH_HISTORY',
    USER_LOCATION: 'USER_LOCATION',
    WX_USER_OPENID:'WX_USER_OPENID',
    WX_ACCOUNT:'WX_ACCOUNT'
};

const PageCode = {
    // 首页
    Home: 'Home',
};

// 门户apis
export const PortalApis = {
    HOME: {
        // 获取天气
        GetWeather: {
            apiCode: 'Weather',
            pageCode: PageCode.Home,
            url: '/Api/app/GetWeather',
        }
    },
    // 新闻资讯类
    NEWS: {
        LIST: {
            apiCode: '',
            pageCode: '',
            url: '/Api/cms/GetCatalogContentList',
        },
        DETAIL: {
            apiCode: '',
            pageCode: '',
            url: '/Api/cms/GetContentDetails',
        },
    },
    // 六大类
    ELEMENTS: {
        // 非游不可列表
        AttractionsRecommendList: {
            apiCode: '',
            pageCode: '',
            url: '/Api/cms/GetModuleDataByIdentifier',
        },
        // 全部景区列表
        AttractionsList: {
            apiCode: 'AttractionsList',
            pageCode: PageCode.AttractionsList,
            url: '/api/Attractions/AttractionsList',
        },
        // 景区详情
        AttractionsDetail: {
            apiCode: 'AttractionsDetail',
            pageCode: PageCode.AttractionsDetail,
            url: '/api/Attractions/AttractionsDetail',
        },
        //景区门票
        AttractionsTicketList: {
            apiCode: '',
            pageCode: '',
            url: '/api/Attractions/AttractionsTicketList',
        },
    },
};
